<extend name="Common@Layout:hui-admin" />
<block name="title"><title>Administator管理后台</title></block>
<block name="style">

</block>

<block name="main">
<div class="pd-20">
	<form action="{:u('Api/Student/savesign')}" method="post" class="form form-horizontal validator_form close-dialog" id="form-article-add">
		<div class="row cl">
			<label class="form-label col-2"><span class="c-red">*</span>上课时间：</label>
			<div class="formControls col-6">
			  	<input type="text" class="input-text <if condition="!$info">mini-time</if>" value="{$info.title}" readonly placeholder="请选择上课时间" name="title"  data-rule="上课时间:required;">
			</div>
		</div>
		<div class="row cl">
			<label class="form-label col-2">学生：</label>
			<div class="formControls col-9">
				<span style="color:red">选择到课的学生</span>
			  	<div class="row cl">
			  		<volist name="students" id="vo">
			  		<php>
			  			$dao = explode(',',$info['dao']);
						$qingjia = explode(',',$info['qingjia']);
			  			if(in_array($vo['id'],$dao)){
			  				$d = 1;
			  			}elseif(in_array($vo['id'],$qingjia)){
			  				$d = 3;
			  			}else{
			  				$d = 0;
			  			}
			  		</php>
			  		<div class="l" style="width:600px;">
			  			{$vo.student}<notempty name="vo['tel']">({$vo.tel})</notempty> 
			  			<label><input type="radio" value="1" <if condition="$d eq 1">checked</if> name="users[{$vo.id}]">已到</label>
			  			<label><input type="radio" value="3" <if condition="$d eq 3">checked</if> name="users[{$vo.id}]">请假</label><br/>
			  		</div>
			  		</volist>
			  	</div>
			</div>
		</div>
		
	  	<div class="row cl">
	    	<div class="col-9 col-offset-2">
	    		<input type="hidden" name="id" value="{$info['id']}"/>
	    		<input type="hidden" name="lid" value="{$lid}"/>
	    		<input type="hidden" name="uid" value="{$uid}"/>
	      		<input class="btn btn-primary radius" type="submit" value="&nbsp;&nbsp;保存&nbsp;&nbsp;">
	    		<button onClick="parent.close_iframe_dialog();" class="btn btn-default radius" type="button">&nbsp;&nbsp;取消&nbsp;&nbsp;</button>
	    	</div>
	  	</div>
	</form>
</div>
</block>

<block name="script">
<css href="/Public/Sea/modules/kindeditor/src/default.css,/Public/Sea/modules/kindeditor/css/upload.css" />
<js href="/Public/Sea/modules/kindeditor/src/kindeditor-min.js,/Public/Sea/modules/kindeditor/src/lang/zh_CN.min.js" />
<script type="text/javascript">
$(function(){
	$('.skin-minimal input').iCheck({
		checkboxClass: 'icheckbox-blue',
		radioClass: 'iradio-blue',
		increaseArea: '20%'
	});
	
	$.Huitab("#tab-system .tabBar span","#tab-system .tabCon","current","click","0");
	
	$('.mini-time').datepicker({format: 'yyyy/mm/dd'});

});
var config = {appid:'{$app['app_id']}',appkey:'{$app['app_key']}'};
var uploadurl = '/material/image/upload';
var editor1 = KindEditor.create('textarea[name="content"]',{
	uploadJson : uploadurl,
	allowFileManager : true,
	fileManagerJson : config.fileManagerJson,
	afterBlur: function(){this.sync();}
});
</script>
</block>